﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ToDoApp.Models;

// Every request that comes through your page, will be routed through the HomeController.
namespace ToDoApp.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index() // Whatever you name the ActionResult this is the Page it will run too on the view. 
        {
            ToDo todo1 = new ToDo("Hello", "World");
            todo1.Task = "Learn basic C#";

            return View(todo1);
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}